package com.example.blogsystemssm.mapper;

import com.example.blogsystemssm.model.ArticleInfo;
import com.fasterxml.jackson.databind.annotation.JsonAppend;
import com.sun.java.swing.plaf.windows.WindowsTextAreaUI;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

@Mapper
public interface ArticleMapper {
    public List<ArticleInfo> getList(@Param("uid")Integer uid);

    public ArticleInfo getDetail(@Param("aid")Integer aid);

    public int delArt(@Param("aid")Integer aid,
                      @Param("uid")Integer uid);

    public ArticleInfo updateContent(@Param("title")String title,
                                     @Param("aid") String aid,
                                     @Param("content")String content,
                                     @Param("updatetime") Date updatetime,
                                     @Param("uid")Integer uid);

    public Integer getCount(@Param("uid")Integer uid);
}
